import React, { Component } from 'react';
import styles from './index.module.scss';
import {connect} from "react-redux";

class MainData extends Component {
  static displayName = 'MainData';

  static propTypes = {};

  static defaultProps = {};

  constructor(props) {
    super(props);
    this.state = {};
  }

  render() {
    return (
      <div className={styles.wrapper}>
        <div className={styles.content}>
          <div className={styles.contentItem}>
            <div className={styles.contentNum}>
              <span className={styles.bigNum}>{this.props._acccessNumber_index}</span>
              <span className={styles.symbol}>+</span>
            </div>
            <div className={styles.contentDesc}>— 总浏览量 —</div>
          </div>
          <div className={styles.contentItem}>
            <div className={styles.contentNum}>
              <span className={styles.bigNum}>{this.props._accessNumber_do}</span>
              <span className={styles.symbol}>+</span>
            </div>
            <div className={styles.contentDesc}>— 实验总量 —</div>
          </div>
        </div>
      </div>
    );
  }
}

const mapStateToProps = (state) => {
  return {
    _acccessNumber_index: state.access.acccessNumber_index,
    _accessNumber_do: state.access.accessNumber_do
  };
};
const mapDispatchToProps = (dispatch) => {
  return {
  };
};
export default connect(mapStateToProps, mapDispatchToProps)(MainData);
